/* Alfred CI/CD Styles - Based on Jeeves CI/CD */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-bg: #ecf0f1;
    --dark-bg: #2c3e50;
    --text-light: #ffffff;
    --text-dark: #2c3e50;
    --border-color: #bdc3c7;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --retro-gold: #d4af37;
    --retro-bronze: #cd7f32;
    --retro-cream: #f5f5dc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(135deg, var(--retro-cream) 0%, #e8e8e8 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    min-height: 100vh;
}

/* Decorative Corners */
.decorative-corner {
    position: fixed;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--retro-gold), var(--retro-bronze));
    z-index: 1;
}

.decorative-corner::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid var(--retro-cream);
}

.top-left {
    top: 0;
    left: 0;
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.top-right {
    top: 0;
    right: 0;
    clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.bottom-left {
    bottom: 0;
    left: 0;
    clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.bottom-right {
    bottom: 0;
    right: 0;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 32px var(--shadow-color);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.avatar-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--retro-gold), var(--retro-bronze));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: gentle-pulse 3s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.title-group h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-style: italic;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 10px;
    box-shadow: 0 8px 32px var(--shadow-color);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tab-btn {
    padding: 12px 30px;
    border: none;
    background: transparent;
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin: 0 5px;
    font-family: inherit;
}

.tab-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: var(--info-color);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--info-color), #2980b9);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Main Content */
.main-content {
    margin-bottom: 30px;
    position: relative;
}

/* Panel */
.panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px var(--shadow-color);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.panel h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--retro-gold);
    padding-bottom: 10px;
}

/* Full Width Panel */
.panel-fullwidth {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px var(--shadow-color);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: none;
    min-height: 500px;
}

.panel-fullwidth.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.panel-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    border-bottom: 2px solid var(--retro-gold);
    padding-bottom: 10px;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

/* Controls */
.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Buttons */
.primary-btn, .secondary-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: inherit;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.primary-btn::before, .secondary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.primary-btn:hover::before, .secondary-btn:hover::before {
    left: 100%;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #c0392b 50%, #a93226 100%);
    color: var(--text-light);
    box-shadow: 
        0 6px 20px rgba(231, 76, 60, 0.25),
        0 2px 8px rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.primary-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, var(--accent-color) 50%, #e74c3c 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(231, 76, 60, 0.35),
        0 4px 15px rgba(231, 76, 60, 0.25);
}

.primary-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.secondary-btn {
    background: linear-gradient(135deg, var(--info-color) 0%, #2980b9 50%, #1f618d 100%);
    color: var(--text-light);
    box-shadow: 
        0 6px 20px rgba(52, 152, 219, 0.25),
        0 2px 8px rgba(52, 152, 219, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, var(--info-color) 50%, #3498db 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(52, 152, 219, 0.35),
        0 4px 15px rgba(52, 152, 219, 0.25);
}

.secondary-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Script Modal */
.script-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    backdrop-filter: blur(8px);
    animation: modalBackdropFadeIn 0.3s ease-out;
}

.script-modal-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 24px;
    padding: 0;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.25),
        0 16px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.script-modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    padding: 24px 32px;
    border-radius: 24px 24px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.script-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.script-modal-body {
    padding: 32px;
    overflow-y: auto;
    max-height: calc(85vh - 160px);
}

.script-content {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #2c3e50;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.script-info {
    margin-bottom: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    border-radius: 12px;
    border-left: 4px solid var(--success-color);
}

.script-info p {
    margin: 8px 0;
    color: var(--primary-color);
    font-weight: 500;
}

.script-info strong {
    color: var(--secondary-color);
}

/* Node Details Modal */
.node-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    backdrop-filter: blur(8px);
    animation: modalBackdropFadeIn 0.3s ease-out;
}

.node-details-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 24px;
    padding: 0;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.25),
        0 16px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.node-details-header {
    background: linear-gradient(135deg, var(--info-color), #2980b9);
    color: var(--text-light);
    padding: 24px 32px;
    border-radius: 24px 24px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.node-details-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.node-details-body {
    padding: 32px;
    overflow-y: auto;
    max-height: calc(85vh - 160px);
}

.node-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.node-info-item {
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.node-info-item label {
    display: block;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.node-info-item span {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 500;
}

/* View Script Button */
.view-script-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--success-color), #27ae60);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.2);
}

.view-script-btn:hover {
    background: linear-gradient(135deg, #27ae60, var(--success-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.view-script-btn:active {
    transform: translateY(0);
}

/* Close Button */
.close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: scale(1.1);
}

/* Build Items */
.builds-list {
    max-height: 400px;
    overflow-y: auto;
}

.build-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.build-item:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateX(5px);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.build-item h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.build-item p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.build-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-success {
    background: var(--success-color);
    color: white;
}

.status-running {
    background: var(--info-color);
    color: white;
    animation: pulse 2s infinite;
}

.status-failed {
    background: var(--accent-color);
    color: white;
}

.status-pending {
    background: var(--warning-color);
    color: white;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Butler Message */
.butler-message {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 32px var(--shadow-color);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 30px;
}

.butler-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--retro-gold), var(--retro-bronze));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    transition: all 0.3s ease;
}

.message-content p {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 0;
    transition: all 0.3s ease;
}

.message-content.success p {
    color: var(--success-color);
    font-weight: bold;
}

.message-content.error p {
    color: var(--accent-color);
    font-weight: bold;
}

.message-content.info p {
    color: var(--info-color);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    animation: modalBackdropFadeIn 0.3s ease-out;
}

@keyframes modalBackdropFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

.modal-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 24px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.25),
        0 16px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.modal-content.large {
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0px);
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, #34495e 100%);
    color: white;
    padding: 24px 32px;
    border-radius: 24px 24px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.modal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.close-btn:active {
    transform: scale(0.95) rotate(90deg);
}

.modal-body {
    padding: 32px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--info-color), var(--primary-color));
    border-radius: 4px;
    transition: background 0.3s ease;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.modal-content h3 {
    color: var(--primary-color);
    margin-bottom: 24px;
    font-size: 1.6rem;
    text-align: center;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-color);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--info-color);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--secondary-color);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

/* Flow Details Modal Styles */
.flow-info-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.9) 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 28px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.flow-info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--info-color), var(--retro-gold), var(--success-color));
}

.info-item {
    display: flex;
    margin-bottom: 16px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-item:hover {
    background: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0 -12px 16px -12px;
}

.info-item:last-child:hover {
    margin-bottom: -8px;
}

.info-item label {
    font-weight: 700;
    color: var(--primary-color);
    min-width: 120px;
    margin-right: 20px;
    margin-bottom: 0;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    position: relative;
}

.info-item label::after {
    content: ':';
    margin-left: 4px;
    color: var(--retro-gold);
    font-weight: 600;
}

.info-item span {
    color: var(--secondary-color);
    flex: 1;
    word-break: break-word;
    font-size: 0.95rem;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.6);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Nodes Section */
.nodes-section, .actions-section {
    margin-top: 28px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(46, 204, 113, 0.1) 100%);
    border-radius: 12px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    position: relative;
    overflow: hidden;
}

.section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--info-color), var(--retro-gold), var(--success-color));
}

.section-header h4 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.nodes-list, .actions-list {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 4px;
}

.nodes-list::-webkit-scrollbar, .actions-list::-webkit-scrollbar {
    width: 6px;
}

.nodes-list::-webkit-scrollbar-track, .actions-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.nodes-list::-webkit-scrollbar-thumb, .actions-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--info-color), var(--primary-color));
    border-radius: 3px;
}

.node-item, .action-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    border: 1px solid rgba(52, 152, 219, 0.15);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.node-item::before, .action-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--info-color), var(--success-color));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.node-item:hover, .action-item:hover {
    transform: translateY(-3px) translateX(2px);
    box-shadow: 
        0 8px 25px rgba(52, 152, 219, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--info-color);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 249, 250, 1) 100%);
}

.node-item:hover::before, .action-item:hover::before {
    transform: scaleY(1);
}

.node-info, .action-info {
    flex: 1;
}

.node-info h5, .action-info h5 {
    color: var(--primary-color);
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.node-info p, .action-info p {
    margin: 4px 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.node-actions, .action-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--info-color);
    color: white;
    font-weight: 500;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.action-btn.danger {
    background: var(--accent-color);
}

.action-btn.danger:hover {
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.action-content {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 8px 0;
    border: 1px solid #e9ecef;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-color);
    font-style: italic;
    background: rgba(248, 249, 250, 0.5);
    border-radius: 10px;
    border: 2px dashed var(--border-color);
}

/* Execution Details with Node Status */
.execution-details {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.execution-nodes {
    margin-top: 20px;
}

.execution-nodes h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.node-execution-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(248, 249, 250, 0.3);
    transition: all 0.3s ease;
}

.node-execution-item.running {
    background: rgba(52, 152, 219, 0.1);
    border-color: var(--info-color);
    animation: nodeRunning 2s infinite;
}

.node-execution-item.success {
    background: rgba(39, 174, 96, 0.1);
    border-color: var(--success-color);
}

.node-execution-item.failed {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--accent-color);
}

.node-execution-item.pending {
    background: rgba(243, 156, 18, 0.1);
    border-color: var(--warning-color);
}

@keyframes nodeRunning {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(52, 152, 219, 0);
    }
}

.node-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.node-status-indicator.pending {
    background: var(--warning-color);
}

.node-status-indicator.running {
    background: var(--info-color);
    animation: pulse 1.5s infinite;
}

.node-status-indicator.success {
    background: var(--success-color);
}

.node-status-indicator.failed {
    background: var(--accent-color);
}

.node-execution-info {
    flex: 1;
}

.node-execution-info h5 {
    margin: 0 0 4px 0;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.node-execution-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.node-error-message {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 6px;
    color: var(--accent-color);
    font-size: 0.85rem;
    font-family: monospace;
}

.execution-progress {
    margin: 15px 0;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    height: 8px;
}

.execution-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--info-color));
    transition: width 0.3s ease;
    border-radius: 10px;
}

.execution-progress-bar.failed {
    background: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .tab-navigation {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-btn {
        width: 100%;
        margin: 0;
    }
    
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .panel-header h2 {
        font-size: 1.5rem;
        min-width: auto;
        width: 100%;
    }
    
    .avatar-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .title-group h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .decorative-corner {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .panel {
        padding: 15px;
    }
    
    .title-group h1 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10px;
    }
}

/* Script Editor Styles */
.script-editor {
    margin-top: 15px;
}

.action-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-controls select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    font-size: 14px;
    color: var(--text-dark);
}

.action-controls select:focus {
    outline: none;
    border-color: var(--info-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

#script-content {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    line-height: 1.5;
}

#script-content:focus {
    outline: none;
    border-color: var(--info-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

#script-content::placeholder {
    color: #6c757d;
    font-style: italic;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.section-header h4 {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
}